#define _CRT_SECURE_NO_WARNINGS

#include "vector.h"
void test_vector()
{
	zyb::vector<int> v;
	cout << v.empty() << endl;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4); 
	v.push_back(5);
	v.push_back(6);
	v.push_back(7);
	cout << v.empty() << endl;
	for (auto e : v)
	{
		cout << e << " ";
	}
	cout << endl;
	v.pop_back();
	for (auto e : v)
	{
		cout << e << " ";
	}
	cout << endl;
	cout << v[2] << endl;
	v.resize(3);
	for (auto e : v)
	{
		cout << e << " ";
	}
	cout << endl;
	cout << v.front() << " " << v.back() << endl;
}
void test_vector2()
{
	zyb::vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	v.push_back(5);
	v.push_back(6);
	v.push_back(7);
	zyb::vector<int> v2(v);
	for (auto e : v2)
	{
		cout << e << ' ';
	}
	cout << endl;
	v2.insert(v2.begin()+2, 0);
	for (auto e : v2)
	{
		cout << e << ' ';
	}
	cout << endl;
	v2.earse(v2.begin());
	for (auto e : v2)
	{
		cout << e << ' ';
	}
	cout << endl;

}
int main()
{
	test_vector2();
	return 0;
}